package com.samsungmobile.common;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Log Class
 * 
 * @author msjung
 * 
 */
public class Logger {

	public static final Log LOG_NOHUP = LogFactory.getLog("nohup");
	
	public static final Log LOG_EMAIL = LogFactory.getLog("email");
	
	public static final Log LOG_REGISTER_EMAIL = LogFactory.getLog("reg_email");
	
	/**
	 * Exception printStackTrace �� nohup �α׿� ��´�
	 * 
	 * @param e
	 */
	public static void printError(Exception e) {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		e.printStackTrace(new PrintStream(baos));
		String eMsg = baos.toString();
		LOG_NOHUP.error(eMsg);
	}

}
